package com.gitee.jjnnzb.designpatterninspring.business.openapi.handler;

import java.util.Map;

/**
 * @author Jjn
 * @since 2023/8/10 19:47
 */
public abstract class DataPushTemplate {
    
    protected abstract boolean checkIfAlreadyHandled(Map<String, Object> map);
    
    protected abstract void handleBaseRecord(Map<String, Object> map);
    
    protected abstract void handleExtraInfo(Map<String, Object> map);
    
    protected abstract String getChannelName();
    
    
    public void handle0(Map<String, Object> map) {
        if (checkIfAlreadyHandled(map)) {
            return;
        }
        handleBaseRecord(map);
        handleExtraInfo(map);
    }
}
